import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
//尝试引入Vant库
// import {Uploader} from 'vant'
// 引入所有Vant组件
import Vant from 'vant'
//引入所需的组件的样式
import 'vant/lib/Uploader/style';
// import 'vant/lib/toast/style';
import 'vant/lib/index.css'
//引入mock数据
import '@/mock/index.js'

import App from './App.vue'
import router from './router'

// 禁用Vue DevTools
if (process.env.NODE_ENV === 'development') {
  // 在开发环境中禁用Vue DevTools
  try {
    if (window.__VUE_DEVTOOLS_GLOBAL_HOOK__) {
      // 如果DevTools已经存在，则禁用其功能
      const hook = window.__VUE_DEVTOOLS_GLOBAL_HOOK__
      hook.emit = () => {}
      hook.on = () => {}
      hook.off = () => {}
      hook.once = () => {}
    }
  } catch (e) {
    // 忽略错误
  }
}

const app = createApp(App)

//注册所需的组件
// app.use(Uploader)
app.use(Vant)

app.use(createPinia())
app.use(router)

app.mount('#app')
